<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>修改商品</title>

    <!-- Bootstrap core CSS -->
    <link href="__PUBLIC__/template/css/bootstrap.css" rel="stylesheet">

    <!-- Add custom CSS here -->
    <link href="__PUBLIC__/template/css/sb-admin.css" rel="stylesheet">
    <link rel="stylesheet" href="__PUBLIC__/template/font-awesome/css/font-awesome.min.css">
    <script type="text/javascript" src="__PUBLIC__/js/jquery.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/addProduct.js"></script>
</head>

<body>
<div id="page-wrapper">
    <form method="post" action="{:U('Product/update')}" enctype="multipart/form-data">
        <div class="form-group">
            <label for="aa">商品名</label>
            <input type="text" name="name" class="form-control" id="aa" placeholder="输入商品名">
        </div>

        <div class="form-group">
            <label for="aa">单价</label>
            <input type="text" name="price" class="form-control" id="aa" placeholder="输入单价">
        </div>

        <div class="form-group">
            <label for="bb">商品分类(菜单项)</label>
            <select name="mid" id="bb" class="form-control">
                <foreach name='arr' item='v'>  
                    <tr>  
                        <td>  
                            <option value="{$v.id}">
                            <?php echo str_repeat('----',$v['level']);?>
                            {$v.name}
                            </option>一级分类  
                        </td>  
                    </tr>  
                </foreach>
                <!-- <foreach name="cate" item="v">
                    <option value="{$v.id}">{$v.html} {$v.title}</option>
                </foreach> -->
            </select>
        </div>
        <div class="form-group">
            <label for="aa">商品图片</label>
            <img src="" id="image" />
            <input type="file" name="photo" class="form-control" id="photo" value="上传图片" onchange="addProduct(this)">
            <!-- onchange在file选择完路径后执行 -->
        </div>

        <div class="form-group">
            <label for="aa">详细信息图片</label>
            <img src="" id="image" />
            <input type="file" name="detailsP" class="form-control" id="photo" value="上传图片" onchange="addProduct(this)">
            <!-- onchange在file选择完路径后执行 -->
        </div>

         <script id="container" name="detailsC" type="text/plain" style="width:800px;height:200px">这里写你的文章内容!</script>
            <!-- 文本编辑器里别留多余空格!,还是有,要字符串处理 -->
            <!-- 配置文件 -->
            <script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
            <!-- 编辑器源码文件 -->
            <script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.all.js"></script>
            <!-- 实例化编辑器 -->
            <script type="text/javascript">
                var ue = UE.getEditor('container');
            </script>
        <input type="submit" name="submit" class="btn btn-default" value="保存修改" />
    </form>
</div>
<script src="__PUBLIC__/template/js/jquery-1.10.2.js"></script>
<script src="__PUBLIC__/template/js/bootstrap.js"></script>
<script src="__PUBLIC__/template/js/app.js"></script>

</body>
</html>
</body>
</html>